<?php 
	
	$dsn = "mysql: host=localhost;dbname=tk173;charset=utf8";
	$pdo = new PDO($dsn,"root","root");
	$sql = "select * from stu_info";
	$stat = $pdo->query($sql);
	$name= [];
	while(($res = $stat->fetchColumn(1))!==false){
		$name []= $res;
	}

print_r($name);
 ?>